# 作者：小七
# 2025年01月04日

class MusicPlayer:
    instance = None

    def __new__(cls, *args, **kwargs):
        if cls.instance is None:
            cls.instance = super().__new__(cls)
        return cls.instance

    def __init__(self, name):
        self.name = name


if __name__ == "__main__":
    player1 = MusicPlayer('qlx')
    player2 = MusicPlayer('dfp')
    print(id(player1))
    print(id(player2))
    print(player1.name)
    print(player2.name)
